<?php
namespace Model;
use Think\Model;
class UserModel extends Model {
	function verify() {
		$cfg = array(
				'fontSize'  =>  30,              // 验证码字体大小(px)
				'length'    =>  4,               // 验证码位数
				'fontttf'   =>  '4.ttf',              // 验证码字体，不设置随机获取
		);
		$ver = new \Think\Verify($cfg);
		$z = $ver->entry();
		if ($z) {
			return $z;
		}
	}
	function checkName($t_number,$id_number,$pass) {
		$z = $this->where('t_number=' . $t_number AND 'id_number=' . $id_number)->find();
		if ($z) {
			if (md5($pass) == $z['pass']) {
				return $z;
			} else {
				return null;
			}
		} else {
			return null;
		}
	}
}